home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
051-075
/
scopedisk74
/
mpaint
/
readme
< prev
next >
Wrap
Text File
|
1995-03-19
|
11KB
|
214 lines
/*============================================================================*/
/* MPaint Source Docs */
/*============================================================================*/
General Info:
MPaint was written to learn how to use intuition and the graphics subsystem.
Therefore, it is not a very good paint program. However, it does contain
some routines I find usefull.
Compiled under Manx 3.6a, debuged with SDB(source level debugger)
Thanks to Jim Kent for his IFF reader/writer(although I plan to replace it
with IFFParse.lib)
Thanks to the great arp dudes for the file requester(keep up the good work).
The rest is completely original(as far as I can remember).
I still don't understand Intuition all that well, gadgets in particular.
I don't understand how to change the selected status of a gadget, and have
the imagery update properly. Also, if I refresh a gadget list, and there
are selected complement booleans, they inverse, and I don't understand why.
MPaint frees everything it allocates, and leaves the system exactly as
it found it(as far as I know, if anyone finds a memory leak, let me know).
Thanks to Bryce Nesbitt for endless hours of consultation and laughs.
/*============================================================================*/
Distribution legalese:
MPaint V0.60 Copyright © 1989 Kevin T. Seghetti. Unlimited, revokable, free,
non-exclusive licence hereby granted to any sentient being to use or distribute
this code without change provided this and any other copyright
notices remain fully attached and are reproduced in any simultaneously
distributed printed matter and with the exception that, without prior
written permission, it not be utilized by any entity that has been commonly
referred to as Robert W. Skyles, Skyles Electric Works, Jim Drew, Regie
Warren or any organization founded by, controlled, employing or profiting
any such entity, it's offspring or spouses.
I make no warranties, expressed or implied, as to the usefulness of this code
for any particular purpose, and the user assumes all responsibility for
damages that may occur from use of said code.
FISH use ok, but contact me, I may have a better version.
English translation:
This code is freely redistributible, as long as it is not changed in any way.
If you wish to make enhancements, that is fine,
please send them to me and I will clean them up(if needed) and
include them in a future release.
If you have any questions, Send physical mail with a fone #, and I will get
back to you.
This code is not complete, I just don't have time at the present to work on it.
I may pick it up again, and add brush support, etc.
/*============================================================================*/
To use program from workbench:
1. Make a copy of workbench.
2. Delete something from the workbench(preferences#? is enough)
2. copy MPaint and MPaint.info to workbench.
3. Copy arp.library to workbench:libs.
4. Boot Workbench.
5. Click on MPaint icon
/*----------------------------------------------------------------------------*/
To use program from cli:
1. Copy arp.library to libs:
2. run MPaint
/*----------------------------------------------------------------------------*/
To Compile:
1. Get Manx 3.6a
2. unzoo MPaintSource into work directory
3. Makedir iff under work directory
4. unzoo MPaintIff into work directory
5. cd work directory
6. make
/*============================================================================*/
Routines:
Here are the headers to some usefull routines
/*----------------------------------------------------------------------------*/
Requesters.c stuff:
( I think most "requesters" should be windows, and requesters saved for
immediate user interaction only(note the palette is a window,
so the only requester code I need is for auto-requesters)
/*============================================================================*/
/* DoAutoRequest: Display an autorequest */
/* Inputs: Win -> window to attach requestor to */
/* Body,Positive,Negative = pointers to text strings */
/* Positive may be a NULL, will only display the negative option */
/* Win may be null, will appear on the workbench screen */
/*============================================================================*/
/*============================================================================*/
/* DoMultipleAutoRequest: Display anautorequest */
/* Inputs: Win -> to window to attach requestor to */
/* Positive,Negative = pointers to text strings */
/* Body = pointer to array of strings,with a null ptr at the end */
/* Positive may be a NULL, will only display the negative option */
/* Win may be null, will appear on the workbench screen */
/*============================================================================*/
menus.c stuff: (this stuff is not general enough at this point
but still useable)
/*============================================================================*/
/* CreateSmartMenuItems: create a list of menu items, with control */
/* over left edge placement */
/* Inputs: */
/* MenuText->array of pointers to text strings, */
/* MenuKeys->array of single chars, indicating hotkeys */
/* (if null, then no hot key for that item) */
/* LeftEdge = # of pixels from left edge text should begin */
/*============================================================================*/
/*============================================================================*/
/* CreateMenuItems: create a list of menu items */
/* Inputs: */
/* MenuText->array of pointers to text strings, */
/* MenuKeys->array of single chars, indicating hotkeys */
/* (if null, then no hot key for that item) */
/*============================================================================*/
/*============================================================================*/
/* CreateMenu: Create a menu structure */
/* Inputs: FirstItem-> first item of menuitem list(created by CreateMenuItems)*/
/* MenuName-> null terminated text string, naming menu */
/* Bugs: */
/* IRemember is hard-wired to MenuRemember */
/*============================================================================*/
Text.c stuff: this gets used by everything else for text handling
/*============================================================================*/
/* CreateIntuiText: given a null terminated text string, */
/* create an Intui-text structure */
/* Inputs: string -> null terminated(standard 'c') string */
/* IRemember-> remember structure pointer(see intuition manual */
/*============================================================================*/
Gadgets.c stuff:
/*============================================================================*/
/* AddGadgetsToList: Link two sets of gadgets together */
/* Inputs: MasterGList-> gadget list */
/* NewGlist-> gadget list */
/* Description: */
/* links NewGList to the end of MasterGList */
/*============================================================================*/
/*============================================================================*/
/* CreatePropGadget: create one proportional gadget */
/* Inputs: LeftEdge = x offset in pixels from left edge of window */
/* TopEdge = y offset in pixels from top of current window */
/* Width = Width of gadget in pixels. */
/* Height = Height of gadget in pixels. */
/* GRemember-> IRemember structure pointer */
/* GNum = Number of gadget(GadgetID) */
/*============================================================================*/
/*============================================================================*/
/* CreateInvisibleGadgets: creates a vertical stack of invisible gadgets */
/* Inputs: Count = # of gadgets to create */
/* LeftEdge = x offset in pixels from left edge of window */
/* TopEdge = y offset in pixels from top of current window */
/* Width = Width of gadget in pixels. */
/* Height = Height of gadget in pixels. */
/* GRemember-> IRemember structure pointer */
/* GNum = Number of gadget(GadgetID) */
/*============================================================================*/
/*============================================================================*/
/* CreateTextGadget: creates a button containing a single line of text */
/* with a border drawn around it */
/* Inputs: text-> to null terminated text string */
/* LeftEdge = x offset in pixels from left edge of window */
/* TopEdge = y offset in pixels from top of current window */
/* GRemember-> IRemember structure pointer */
/* GNum = Number of gadget(GadgetID) */
/* Description: */
/* Will determine width from text, height is hard-wired */
/*============================================================================*/
/*============================================================================*/
/* CreateTextGadgets: creates a list of buttons containing a single line of */
/* text with a border drawn around it */
/* Inputs: text-> to array of null terminated text strings */
/* LeftEdge = x offset in pixels from left edge of window */
/* TopEdge = y offset in pixels from top of current window */
/* GRemember-> IRemember structure pointer */
/* GNum = Number of gadget(GadgetID) */
/* Description: */
/* Will determine width from text, height is hard-wired */
/*============================================================================*/
/*============================================================================*/
/* CreateIntGadget: creates one integer gadget */
/* Inputs: StartVal = number to seed gadget with, in ascii(stupid Intuition) */
/* LeftEdge = x offset in pixels from left edge of window */
/* TopEdge = y offset in pixels from top of current window */
/* GRemember-> IRemember structure pointer */
/* GNum = Number of gadget(GadgetID) */
/*============================================================================*/